#指定内核源码主目录
KERN_DIR = /home/robin/work/kernel-rockchip-nanopi4-linux-v4.4.y

#指定模块程序所在的目录
CUR_DIR = $(shell pwd)

all:
	make -C $(KERN_DIR) M=$(CUR_DIR) modules

clean:
	make -C $(KERN_DIR) M=$(CUR_DIR) clean

install:
	scp *.ko root@192.168.107.61:/drv_code

#指定当前目录哪些文件作为模块程序来编译
# obj-m =  button_drv.o
obj-m =  02_key_drv.o
